/**
 * 文 件 名:  AgreementAbstractTest.java
 * 版    权:  Linkage Technologies Co., Ltd. Copyright YYYY-YYYY,  All rights reserved
 * 描    述:  &lt;描述&gt;
 * 修 改 人:  xiesh
 * 修改时间:  2011-4-12
 * 修改内容:  &lt;修改内容&gt;
 */
package com.linkage.bss.crm.packagemgr.util;

import javax.annotation.Resource;
import javax.sql.DataSource;

import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.linkage.bss.crm.multidb.util.RouteUtil;

/**
 * <一句话功能简述>
 * <功能详细描述>
 *
 * @author  beneho
 * @version  [版本号, 2011-4-12]
 * @see
 * @since  [产品/模块版本]
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath:spring/packageMgr-spring-all.xml" })
public abstract class AbstractCRMTest extends AbstractTransactionalJUnit4SpringContextTests {

	/**
	 * 覆盖的获取配置文件地址的方法
	 */
	//	protected String[] getConfigLocations() {
	//		String[] configFiles = { "classpath:spring/agreementManager-spring-all.xml" };
	//
	//		return configFiles;
	//	}

	//	//@Override
	//	protected void prepareTestInstance() throws Exception {
	//
	//		//	super.prepareTestInstance();
	//	}

	@Override
	@Resource(name = "dataSource")
	public void setDataSource(DataSource dataSource) {
		RouteUtil.setCurRequestAreaId("15");
		super.setDataSource(dataSource);
	}

}
